-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize ImageConfig field in Context
Signed-off-by: Atanas Dinov <[email protected]>
- Loading branch information
1 parent
f1d7c53
commit 0dabc8b
Showing
9 changed files
with
105 additions
and
92 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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package combustion | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
"github.com/suse-edge/edge-image-builder/pkg/config" | ||
"github.com/suse-edge/edge-image-builder/pkg/context" | ||
) | ||
|
||
func setupContext(t *testing.T) (ctx *context.Context, teardown func()) { | ||
configDir, err := os.MkdirTemp("", "eib-config-") | ||
require.NoError(t, err) | ||
|
||
buildDir, err := os.MkdirTemp("", "eib-build-") | ||
require.NoError(t, err) | ||
|
||
combustionDir, err := os.MkdirTemp("", "eib-combustion-") | ||
require.NoError(t, err) | ||
|
||
ctx = &context.Context{ | ||
ImageConfigDir: configDir, | ||
BuildDir: buildDir, | ||
CombustionDir: combustionDir, | ||
ImageConfig: &config.ImageConfig{}, | ||
} | ||
|
||
return ctx, func() { | ||
assert.NoError(t, os.RemoveAll(buildDir)) | ||
assert.NoError(t, os.RemoveAll(combustionDir)) | ||
} | ||
} |
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
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
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