Skip to content

Commit

Permalink
Removed 12 out of the 20 cping of the same dir. This integ test needs…
Browse files Browse the repository at this point in the history
… cleaned up desperately before debugging

Signed-off-by: schristoff <28318173+schristoff@users.noreply.github.com>
  • Loading branch information
schristoff committed Nov 22, 2023
1 parent 14d3d3f commit 3dcfca5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions pkg/runtime/runtime_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ func (m *RuntimeManifest) loadDependencyDefinitions() error {
if err != nil {
return err
}
//todo(schristoff): if we are v2, we need to resolve
// our own dependencies
if m.bundle.HasDependenciesV2() {

}

bun, err := bundle.Unmarshal(bunD)
if err != nil {
Expand Down
16 changes: 8 additions & 8 deletions tests/integration/dependencies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,10 @@ func TestSharedDependencies(t *testing.T) {

// Rebuild the bundle from a temp directory so that we don't modify the source directory
// and leave modified files around.
p.TestConfig.TestContext.AddTestDirectory(filepath.Join(p.RepoRoot, "build/testdata/bundles/mysql"), bunDir)
p.TestConfig.TestContext.AddTestDirectory(filepath.Join(p.RepoRoot, "build/testdata/bundles/wordpress"), bunDir)

p.CopyDirectory(filepath.Join(p.RepoRoot, "build/testdata/bundles/wordpress"), ".", false)
p.TestConfig.TestContext.AddTestDirectory(filepath.Join(p.RepoRoot, "build/testdata/bundles/mysql"), bunDir+"/mysql")
p.TestConfig.TestContext.AddTestDirectory(filepath.Join(p.RepoRoot, "build/testdata/bundles/wordpress"), bunDir+"/wordpress")

p.Chdir(bunDir)
p.Chdir(bunDir + "/mysql")
defer p.Chdir(pwd)
defer p.Close()
ctx := p.SetupIntegrationTest()
Expand All @@ -276,11 +274,13 @@ func TestSharedDependencies(t *testing.T) {

publishMySQLBundle(ctx, p)

p.CopyDirectory(filepath.Join(p.RepoRoot, "build/testdata/bundles/mysql"), ".", false)
installMySQLbundle(ctx, p, namespace)

//set up dependency?
p.CopyFile("/cnab/app/mysql/bundle.json", "/cnab/app/dependencies/mysql/bundle.json")
p.Chdir(bunDir + "wordpress")

//todo(schristoff): fix this srsly plz
err = p.CopyFile(bunDir+"/mysql/.cnab/bundle.json", bunDir+"/wordpress/.cnab/app/dependencies/mysql/bundle.json")
require.NoError(p.T(), err, "err copying mysql bundle.json")

installWordpressBundle(ctx, p, namespace, "mysql")

Expand Down

0 comments on commit 3dcfca5

Please sign in to comment.