{"action":"created","issue":{"url":"https://api.github.com/repos/cf-tm-bot/mega/issues/153","repository_url":"https://api.github.com/repos/cf-tm-bot/mega","labels_url":"https://api.github.com/repos/cf-tm-bot/mega/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/cf-tm-bot/mega/issues/153/comments","events_url":"https://api.github.com/repos/cf-tm-bot/mega/issues/153/events","html_url":"https://github.com/cf-tm-bot/mega/issues/153","id":177460590,"number":153,"title":"CATS LoadConfig function should also return an error for validations, and CATS should fail fast if this error occurs. - Story Id: 129477027","user":{"login":"cf-tm-bot","id":20690070,"avatar_url":"https://avatars.githubusercontent.com/u/20690070?v=3","gravatar_id":"","url":"https://api.github.com/users/cf-tm-bot","html_url":"https://github.com/cf-tm-bot","followers_url":"https://api.github.com/users/cf-tm-bot/followers","following_url":"https://api.github.com/users/cf-tm-bot/following{/other_user}","gists_url":"https://api.github.com/users/cf-tm-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/cf-tm-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cf-tm-bot/subscriptions","organizations_url":"https://api.github.com/users/cf-tm-bot/orgs","repos_url":"https://api.github.com/users/cf-tm-bot/repos","events_url":"https://api.github.com/users/cf-tm-bot/events{/privacy}","received_events_url":"https://api.github.com/users/cf-tm-bot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cf-tm-bot/mega/labels/cats:specialize-config-to-cats","name":"cats:specialize-config-to-cats","color":"ededed"},{"url":"https://api.github.com/repos/cf-tm-bot/mega/labels/feature","name":"feature","color":"ededed"},{"url":"https://api.github.com/repos/cf-tm-bot/mega/labels/rejected","name":"rejected","color":"950828"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-09-16T15:56:39Z","updated_at":"2016-10-21T01:32:55Z","closed_at":null,"body":"Validations:\n* Fields should have the correct type. (For this error in particular, if we can't aggregate errors (because errors come from the encoding library), that's fine).\n* Backend is either “dea”, “diego”, or blank\n* ApiEndpoint is a valid URL\n* AppsDomain is a valid Domain\n* Admin user and password should be present\n* Any other validations that the run-cats tasks was doing that we don't get from the above validations.\n\nAggregate all errors and return them.\n\n---\n\nMirrors: [story 129477027](https://www.pivotaltracker.com/story/show/129477027) submitted on Aug 30, 2016 UTC\n- **Requester**: Amit Gupta\n- **Owners**: Steve Taylor, Chunyi Lyu, Josh Aresty\n- **Estimate**: 2.0"},"comment":{"url":"https://api.github.com/repos/cf-tm-bot/mega/issues/comments/255271709","html_url":"https://github.com/cf-tm-bot/mega/issues/153#issuecomment-255271709","issue_url":"https://api.github.com/repos/cf-tm-bot/mega/issues/153","id":255271709,"user":{"login":"cf-tm-bot","id":20690070,"avatar_url":"https://avatars.githubusercontent.com/u/20690070?v=3","gravatar_id":"","url":"https://api.github.com/users/cf-tm-bot","html_url":"https://github.com/cf-tm-bot","followers_url":"https://api.github.com/users/cf-tm-bot/followers","following_url":"https://api.github.com/users/cf-tm-bot/following{/other_user}","gists_url":"https://api.github.com/users/cf-tm-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/cf-tm-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cf-tm-bot/subscriptions","organizations_url":"https://api.github.com/users/cf-tm-bot/orgs","repos_url":"https://api.github.com/users/cf-tm-bot/repos","events_url":"https://api.github.com/users/cf-tm-bot/events{/privacy}","received_events_url":"https://api.github.com/users/cf-tm-bot/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T01:32:55Z","updated_at":"2016-10-21T01:32:55Z","body":"Steve Taylor [commented](https://www.pivotaltracker.com/n/projects/1382120/stories/129477027/comments/153135323) on Oct 19, 2016, 6.36 PM UTC:\n\n`@pt:amit` Using `ginkgo.Fail` resulted in the following output, which seems like it might not be up to snuff -- what do you think?\n\n```\nInvalid configuration.  Please fix the contents of $CONFIG:\n   /tmp/amits_config.json\nbefore proceeding. Detailed errors below:\njson: cannot unmarshal number into Go value of type bool\n* Invalid configuration for ApiEndpoint <*> (host *): lookup *: no such host\n* Invalid configuration for AppDomain <*> (host made-up-app-host-name.*): lookup made-up-app-host-name.*: no such host\n* Invalid configuration: 'admin_user' must be provided\n* Invalid configuration: 'admin_password' must be provided\n--- FAIL: TestCATS (0.01s)\npanic:\nYour test failed.\nGinkgo panics to prevent subsequent assertions from running.\nNormally Ginkgo rescues this panic so you shouldn't see it.\n\nBut, if you make an assertion in a goroutine, Ginkgo can't capture the panic.\nTo circumvent this, you should call\n\n       \tdefer GinkgoRecover()\n\nat the top of the goroutine that caused this panic.\n [recovered]\n       \tpanic:\nYour test failed.\nGinkgo panics to prevent subsequent assertions from running.\nNormally Ginkgo rescues this panic so you shouldn't see it.\n\nBut, if you make an assertion in a goroutine, Ginkgo can't capture the panic.\nTo circumvent this, you should call\n\n       \tdefer GinkgoRecover()\n\nat the top of the goroutine that caused this panic.\n\n\ngoroutine 23 [running]:\npanic(0x4769e0, 0xc42044f280)\n       \t/usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:500 +0x1a1\ntesting.tRunner.func1(0xc4202f2480)\n       \t/usr/local/Cellar/go/1.7.1/libexec/src/testing/testing.go:579 +0x25d\npanic(0x4769e0, 0xc42044f280)\n       \t/usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:458 +0x243\ngithub.com/cloudfoundry/cf-acceptance-tests/vendor/github.com/onsi/ginkgo.Fail(0x51e440, 0x17, 0x0, 0x0, 0x0)\n       \t/Users/pivotal/go/src/github.com/cloudfoundry/cf-acceptance-tests/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go:244 +0x114\ngithub.com/cloudfoundry/cf-acceptance-tests_test.TestCATS(0xc4202f2480)\n       \t/Users/pivotal/go/src/github.com/cloudfoundry/cf-acceptance-tests/cats_suite_test.go:44 +0x67a\ntesting.tRunner(0xc4202f2480, 0x55ef30)\n       \t/usr/local/Cellar/go/1.7.1/libexec/src/testing/testing.go:610 +0x81\ncreated by testing.(*T).Run\n       \t/usr/local/Cellar/go/1.7.1/libexec/src/testing/testing.go:646 +0x2ec\n\nGinkgo ran 1 suite in 809.125956ms\nTest Suite Failed\n```\n\n<!--\nComment Id: 153135323\n-->"}}
{"actor":{"display_login":"cf-tm-bot"}}