Skip to content

Commit

Permalink
fix test error on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lokst committed Aug 14, 2020
1 parent 977d126 commit 4c104ca
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
25 changes: 19 additions & 6 deletions cmd/orb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2651,11 +2651,7 @@ https://circleci.com/orbs/registry/orb/my/orb
tmpBytes = golden.Get(GinkgoT(), filepath.FromSlash("gql_orb_category_list/second_response.json"))
secondResponse := string(tmpBytes)

expectedOutputPath := "gql_orb_category_list/text_output.txt"
if json {
expectedOutputPath = "gql_orb_category_list/pretty_json_output.json"
}
tmpBytes = golden.Get(GinkgoT(), filepath.FromSlash(expectedOutputPath))
tmpBytes = golden.Get(GinkgoT(), filepath.FromSlash("gql_orb_category_list/pretty_json_output.json"))
expectedOutput := string(tmpBytes)

tempSettings.AppendPostHandler("", clitest.MockRequestResponse{
Expand All @@ -2680,7 +2676,24 @@ https://circleci.com/orbs/registry/orb/my/orb
if json {
Expect(displayedOutput).Should(MatchJSON(expectedOutput))
} else {
Expect(displayedOutput).To(Equal(expectedOutput))
Expect(displayedOutput).To(Equal(`Artifacts/Registry
Build
Cloud Platform
Code Analysis
Collaboration
Containers
Deployment
Infra Automation
Kubernetes
Language/Framework
Monitoring
Notifications
Reporting
Security
Testing
Windows Server 2003
Windows Server 2010
`))
}
},
Entry("with --json", true),
Expand Down
17 changes: 0 additions & 17 deletions cmd/testdata/gql_orb_category_list/text_output.txt

This file was deleted.

0 comments on commit 4c104ca

Please sign in to comment.