Skip to content

Commit c90eaec

Browse files
committed
Fix tests.
1 parent cb1a29a commit c90eaec

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ tasks:
209209
generate:assets:
210210
desc: This generates the models and bricks index. Also updates the corresponding testdata.
211211
vars:
212-
sed_replacement: s#runnerVersion = \".*#runnerVersion = \"{{.RUNNER_VERSION}}\"#
212+
sed_replacement: s#RunnerVersion = \".*#RunnerVersion = \"{{.RUNNER_VERSION}}\"#
213213
TMPDIR: '{{trimSuffix "/" (env "TMPDIR")| default "/tmp"}}/generate-assets'
214214
SEMVER_TAG: "{{.RUNNER_VERSION}}"
215215
OUTPUT_DIR: "{{.TMPDIR}}/{{.SEMVER_TAG}}"

internal/e2e/daemon/brick_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@ func TestBricksList(t *testing.T) {
6868
response, err := httpClient.GetBricksWithResponse(t.Context(), func(ctx context.Context, req *http.Request) error { return nil })
6969
require.NoError(t, err)
7070
require.NotEmpty(t, response.JSON200.Bricks)
71-
cfg, err := config.NewFromEnv()
72-
require.NoError(t, err)
7371

74-
staticStore := store.NewStaticStore(paths.New("testdata", "assets", cfg.RunnerVersion).String())
72+
staticStore := store.NewStaticStore(paths.New("testdata", "assets", config.RunnerVersion).String())
7573
brickIndex, err := bricksindex.Load(staticStore.GetAssetsFolder())
7674
require.NoError(t, err)
7775

internal/orchestrator/config/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
)
2929

3030
// runnerVersion do not edit, this is generate with `task generate:assets`
31-
var runnerVersion = "0.6.1"
31+
var RunnerVersion = "0.6.1"
3232

3333
type Configuration struct {
3434
appsDir *paths.Path
@@ -109,7 +109,7 @@ func NewFromEnv() (Configuration, error) {
109109
customEIModelsDir: customEIModelsDir,
110110
PythonImage: pythonImage,
111111
UsedPythonImageTag: usedPythonImageTag,
112-
RunnerVersion: runnerVersion,
112+
RunnerVersion: RunnerVersion,
113113
AllowRoot: allowRoot,
114114
LibrariesAPIURL: parsedLibrariesURL,
115115
}
@@ -161,7 +161,7 @@ func getPythonImageAndTag() (string, string) {
161161
// Python image: image name (repository) and optionally a tag.
162162
pythonImageAndTag := os.Getenv("DOCKER_PYTHON_BASE_IMAGE")
163163
if pythonImageAndTag == "" {
164-
pythonImageAndTag = fmt.Sprintf("app-bricks/python-apps-base:%s", runnerVersion)
164+
pythonImageAndTag = fmt.Sprintf("app-bricks/python-apps-base:%s", RunnerVersion)
165165
}
166166
pythonImage := path.Join(registryBase, pythonImageAndTag)
167167
var usedPythonImageTag string

0 commit comments

Comments
 (0)