testflight: log in after fly is built
@@ -51,15 +51,10 @@ func TestTestflight(t *testing.T) {
}
var _ = SynchronizedBeforeSuite(func() []byte {
- flyBin, err := gexec.Build("github.com/concourse/concourse/fly")
+ var err error
+ config.flyBin, err = gexec.Build("github.com/concourse/concourse/fly")
Expect(err).ToNot(HaveOccurred())
- Eventually(func() *gexec.Session {
- return flyLogin().Wait()
- }, 2*time.Minute, time.Second).Should(gexec.Exit(0))
-
- config.flyBin = flyBin
-
atcURL := os.Getenv("ATC_URL")
if atcURL != "" {
config.atcURL = atcURL
@@ -78,6 +73,10 @@ var _ = SynchronizedBeforeSuite(func() []byte {
payload, err := json.Marshal(config)
Expect(err).ToNot(HaveOccurred())
+ Eventually(func() *gexec.Session {
+ return flyLogin().Wait()
+ }, 2*time.Minute, time.Second).Should(gexec.Exit(0))
+
return payload
}, func(data []byte) {
err := json.Unmarshal(data, &config)
