@@ -42,30 +42,41 @@ var _ = DevSpaceDescribe("pipelines", func() {
4242 framework .ExpectNoError (err )
4343 defer framework .ExpectDeleteNamespace (kubeClient , ns )
4444
45+ rootCmd := cmd .NewRootCmd (f )
46+ persistentFlags := rootCmd .PersistentFlags ()
47+ globalFlags := flags .SetGlobalFlags (persistentFlags )
48+ globalFlags .NoWarn = true
49+ globalFlags .Namespace = ns
50+ globalFlags .Profiles = []string {"profile1" }
51+
52+ cmdCtx := values .WithCommandFlags (context .Background (), globalFlags .Flags )
53+ cmdCtx = values .WithFlagsMap (cmdCtx , map [string ]string {
54+ "test" : "test" ,
55+ "test2" : "" ,
56+ })
57+
4558 devCmd := & cmd.RunPipelineCmd {
46- GlobalFlags : & flags.GlobalFlags {
47- NoWarn : true ,
48- Namespace : ns ,
49- },
50- Pipeline : "dev" ,
51- Ctx : values .WithFlagsMap (context .Background (), map [string ]string {
52- "test" : "test" ,
53- "test2" : "" ,
54- }),
59+ GlobalFlags : globalFlags ,
60+ Pipeline : "dev" ,
61+ Ctx : cmdCtx ,
5562 }
5663 err = devCmd .RunDefault (f )
5764 framework .ExpectNoError (err )
5865
5966 framework .ExpectLocalFileContentsImmediately ("test.txt" , "test\n " )
6067 framework .ExpectLocalFileContentsImmediately ("test2.txt" , "\n " )
68+ framework .ExpectLocalFileContentsImmediately ("dev-profile.txt" , "profile1\n " )
6169 framework .ExpectLocalFileContentsImmediately ("other.txt" , "test\n " )
6270 framework .ExpectLocalFileContentsImmediately ("other2.txt" , "false\n " )
6371 framework .ExpectLocalFileContentsImmediately ("other3.txt" , "true\n " )
72+ framework .ExpectLocalFileContentsImmediately ("other-profile.txt" , "profile1\n " )
6473 framework .ExpectLocalFileContentsImmediately ("dep1-test.txt" , "test\n " )
6574 framework .ExpectLocalFileContentsImmediately ("dep1-test2.txt" , "true\n " )
75+ framework .ExpectLocalFileContentsImmediately ("dep1-dev-profile.txt" , "profile1\n " )
6676 framework .ExpectLocalFileContentsImmediately ("dep1-other.txt" , "test\n " )
6777 framework .ExpectLocalFileContentsImmediately ("dep1-other2.txt" , "false\n " )
6878 framework .ExpectLocalFileContentsImmediately ("dep1-other3.txt" , "false\n " )
79+ framework .ExpectLocalFileContentsImmediately ("dep1-other-profile.txt" , "profile1\n " )
6980 })
7081
7182 ginkgo .It ("should exec container" , func () {
0 commit comments