Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aknysh committed Apr 25, 2024
1 parent f0ad83d commit f4c1142
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions pkg/describe/describe_affected_test.go
Expand Up @@ -37,31 +37,6 @@ func TestDescribeAffectedWithTargetRefClone(t *testing.T) {
t.Log(fmt.Sprintf("\nAffected components and stacks:\n%v", string(affectedYaml)))
}

func TestDescribeAffectedWithTargetRefCheckout(t *testing.T) {
configAndStacksInfo := schema.ConfigAndStacksInfo{}

cliConfig, err := cfg.InitCliConfig(configAndStacksInfo, true)
assert.Nil(t, err)

// We are using `atmos.yaml` from this dir. This `atmos.yaml` has set base_path: "../../examples/tests",
// which will be wrong for the remote repo which is cloned into a temp dir.
// Set the correct base path for the cloned remote repo
cliConfig.BasePath = "./examples/tests"

// Git reference and commit SHA
// Refer to https://git-scm.com/book/en/v2/Git-Internals-Git-References for more details
ref := "refs/heads/master"
sha := ""

affected, err := e.ExecuteDescribeAffectedWithTargetRefCheckout(cliConfig, ref, sha, true, true)
assert.Nil(t, err)

affectedYaml, err := yaml.Marshal(affected)
assert.Nil(t, err)

t.Log(fmt.Sprintf("\nAffected components and stacks:\n%v", string(affectedYaml)))
}

func TestDescribeAffectedWithTargetRepoPath(t *testing.T) {
configAndStacksInfo := schema.ConfigAndStacksInfo{}

Expand Down

0 comments on commit f4c1142

Please sign in to comment.