diff --git a/internal/execenv/execenv_test.go b/internal/execenv/execenv_test.go index 23dea99..d705f66 100644 --- a/internal/execenv/execenv_test.go +++ b/internal/execenv/execenv_test.go @@ -23,10 +23,11 @@ func TestGenerate(t *testing.T) { _, err := repotest.InstallPlugin("dummy_plugin", testDataDir, testPluginName) assert.Nil(t, err) plugin := plugins.New(conf, testPluginName) - assert.Nil(t, repotest.WritePluginCallback(plugin.Dir, "exec-env", "#!/usr/bin/env bash\nexport FOO=bar")) - env, err := Generate(plugin, map[string]string{}) + assert.Nil(t, repotest.WritePluginCallback(plugin.Dir, "exec-env", "#!/usr/bin/env bash\nexport BAZ=bar")) + env, err := Generate(plugin, map[string]string{"ASDF_INSTALL_VERSION": "test"}) assert.Nil(t, err) - assert.Equal(t, "bar", env["FOO"]) + assert.Equal(t, "bar", env["BAZ"]) + assert.Equal(t, "test", env["ASDF_INSTALL_VERSION"]) }) t.Run("returns error when plugin lacks exec-env callback", func(t *testing.T) {