Skip to content

Commit

Permalink
fix: use rocks-toolbox for mock-rock
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijie-yang committed Sep 24, 2024
1 parent bb519b8 commit 22c8996
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/cli-client/internals/trigger/build_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@ func (s *BuildMetadataSuite) TestGetBuildMetadataCustomDirector(c *C) {
c.Fatal("git not installed")
}
repoPath := filepath.Join(s.dir, "tester-path")
cmd = exec.Command("git", "clone", "https://github.com/canonical/oci-factory.git", repoPath)
cmd = exec.Command("git", "clone", "https://github.com/canonical/rocks-toolbox.git", repoPath)
var errBuf bytes.Buffer
cmd.Stderr = &errBuf
if err := cmd.Run(); err != nil {
c.Logf("stderr: %s", errBuf.String())
c.Fatal(err)
}

err := os.Chdir(filepath.Join(repoPath, "examples", "mock-rock", "1.0"))
err := os.Chdir(filepath.Join(repoPath, "mock_rock", "1.0"))
c.Assert(err, IsNil)

result := trigger.InferBuildMetadata()

prefix := filepath.Join("examples", "mock-rock", "1.0") + "/"
prefix := filepath.Join("mock_rock", "1.0") + "/"
head, err := exec.Command("git", "rev-parse", "HEAD").Output()
headStr := strings.TrimSpace(string(head))
c.Assert(err, IsNil)
source := "canonical/oci-factory"
source := "canonical/rocks-toolbox"
expected := trigger.BuildMetadata{
Source: source,
Directory: prefix,
Expand Down

0 comments on commit 22c8996

Please sign in to comment.