You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- parse args early
- print error if arg parsing fails
- print version info early if requested
- simplify Messenger struct
- use one context.Background()
- use defer to remove stemcell automation artifact
stembuildMessenger.PrintErr(fmt.Sprintf("Warning: The following environment variable is set and might override flags provided to stembuild: %s\n", envName))
@@ -40,39 +38,4 @@ var _ = Describe("StembuildMessenger", func() {
40
38
Eventually(errBuf).Should(Say(message))
41
39
})
42
40
})
43
-
44
-
Describe("EnvironmentVariableWarning", func() {
45
-
It("outputs the expected warning to stderr", func() {
46
-
envVar:="SOME_VAR"
47
-
m.EnvironmentVariableWarning(envVar)
48
-
49
-
Eventually(errBuf).Should(Say(fmt.Sprintf("Warning: The following environment variable is set and might override flags provided to stembuild: %s\n", envVar)))
50
-
})
51
-
})
52
-
53
-
Describe("StemcellAutomationWarning", func() {
54
-
It("outputs the expected warning to stderr", func() {
55
-
m.StemcellAutomationWarning()
56
-
57
-
Eventually(errBuf).Should(Say("Unable to write StemcellAutomation.zip"))
58
-
})
59
-
})
60
-
61
-
Describe("StemcellAutomationWarning", func() {
62
-
It("outputs the expected warning to stderr", func() {
63
-
m.StemcellAutomationWarning()
64
-
65
-
Eventually(errBuf).Should(Say("Unable to write StemcellAutomation.zip"))
66
-
})
67
-
})
68
-
69
-
Describe("PrintVersionInfo", func() {
70
-
It("outputs the expected value to stdout", func() {
71
-
executable:="custom-stembuild"
72
-
version:="my.custom.version"
73
-
m.VersionInfo(executable, version)
74
-
75
-
Eventually(outBuf).Should(Say(fmt.Sprintf("%s version %s, Windows Stemcell Building Tool\n\n", executable, version)))
0 commit comments