-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the app repo url to generate the app hash instead of the config a…
…pp repo url (#471) * Use the app repo url to generate the app hash * Fixed unit tests for generateAppYaml * Fixed unit tests for generateAppYaml * Single place to generate and validate app hash * Fixed unit tests * Removed F from FDescribe * Clean up function parameters * Passing in appHash instead
- Loading branch information
1 parent
c827d7a
commit 7cf9515
Showing
3 changed files
with
31 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -494,22 +494,23 @@ var _ = Describe("Add", func() { | |
|
||
Describe("generateAppYaml", func() { | ||
It("generates the app yaml", func() { | ||
repoURL := "ssh://[email protected]/example/my-source" | ||
params := AddParams{ | ||
Name: "my-app", | ||
Namespace: "wego-system", | ||
Url: "ssh://[email protected]/example/my-source", | ||
Url: repoURL, | ||
Path: "manifests", | ||
Branch: "main", | ||
} | ||
repo := "some-repo" | ||
|
||
desired2 := makeWegoApplication(params) | ||
hash, err := utils.GetAppHash(repo, params.Path, params.Branch) | ||
hash, err := utils.GetAppHash(repoURL, params.Path, params.Branch) | ||
Expect(err).To(BeNil()) | ||
|
||
desired2.ObjectMeta.Labels = map[string]string{WeGOAppIdentifierLabelKey: hash} | ||
|
||
out, err := generateAppYaml(params, repo) | ||
Expect(err).NotTo(HaveOccurred()) | ||
out, err := generateAppYaml(params, hash) | ||
Expect(err).To(BeNil()) | ||
|
||
result := wego.Application{} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters