66
77 "github.com/devstream-io/devstream/internal/pkg/plugininstaller"
88 "github.com/devstream-io/devstream/internal/pkg/plugininstaller/ci/server"
9- "github.com/devstream-io/devstream/internal/ pkg/plugininstaller/common "
9+ "github.com/devstream-io/devstream/pkg/util/scm "
1010)
1111
1212var _ = Describe ("Options struct" , func () {
@@ -20,7 +20,7 @@ var _ = Describe("Options struct", func() {
2020 Type : "github" ,
2121 ConfigLocation : "http://www.test.com" ,
2222 }
23- defaultRepo := & common .Repo {
23+ defaultRepo := & scm .Repo {
2424 Owner : "test" ,
2525 Repo : "test_repo" ,
2626 Branch : "test_branch" ,
@@ -49,10 +49,10 @@ var _ = Describe("Options struct", func() {
4949 })
5050 })
5151
52- Context ("FillDefaultValue method" , func () {
52+ Context ("fillDefaultValue method" , func () {
5353 When ("ci config and repo are all empty" , func () {
5454 It ("should set default value" , func () {
55- opts .FillDefaultValue (defaultOpts )
55+ opts .fillDefaultValue (defaultOpts )
5656 Expect (opts .CIConfig ).ShouldNot (BeNil ())
5757 Expect (opts .ProjectRepo ).ShouldNot (BeNil ())
5858 Expect (opts .CIConfig .ConfigLocation ).Should (Equal ("http://www.test.com" ))
@@ -64,12 +64,12 @@ var _ = Describe("Options struct", func() {
6464 opts .CIConfig = & CIConfig {
6565 ConfigLocation : "http://exist.com" ,
6666 }
67- opts .ProjectRepo = & common .Repo {
67+ opts .ProjectRepo = & scm .Repo {
6868 Branch : "new_branch" ,
6969 }
7070 })
7171 It ("should update empty value" , func () {
72- opts .FillDefaultValue (defaultOpts )
72+ opts .fillDefaultValue (defaultOpts )
7373 Expect (opts .CIConfig ).ShouldNot (BeNil ())
7474 Expect (opts .ProjectRepo ).ShouldNot (BeNil ())
7575 Expect (opts .CIConfig .ConfigLocation ).Should (Equal ("http://exist.com" ))
@@ -79,11 +79,4 @@ var _ = Describe("Options struct", func() {
7979 })
8080 })
8181 })
82-
83- Context ("Encode method" , func () {
84- It ("should return map" , func () {
85- _ , err := opts .Encode ()
86- Expect (err ).Error ().ShouldNot (HaveOccurred ())
87- })
88- })
8982})
0 commit comments