(t *testing.T)
| 41 | } |
| 42 | |
| 43 | func TestGetValues_Run_UserConfigOnly(t *testing.T) { |
| 44 | cfg := actionConfigFixture(t) |
| 45 | client := NewGetValues(cfg) |
| 46 | |
| 47 | releaseName := "test-release" |
| 48 | userConfig := map[string]any{ |
| 49 | "database": map[string]any{ |
| 50 | "host": "localhost", |
| 51 | "port": 5432, |
| 52 | }, |
| 53 | "app": map[string]any{ |
| 54 | "name": "my-app", |
| 55 | "replicas": 3, |
| 56 | }, |
| 57 | } |
| 58 | |
| 59 | rel := &release.Release{ |
| 60 | Name: releaseName, |
| 61 | Info: &release.Info{ |
| 62 | Status: common.StatusDeployed, |
| 63 | }, |
| 64 | Chart: &chart.Chart{ |
| 65 | Metadata: &chart.Metadata{ |
| 66 | Name: "test-chart", |
| 67 | Version: "1.0.0", |
| 68 | }, |
| 69 | Values: map[string]any{ |
| 70 | "defaultKey": "defaultValue", |
| 71 | "app": map[string]any{ |
| 72 | "name": "default-app", |
| 73 | "timeout": 30, |
| 74 | }, |
| 75 | }, |
| 76 | }, |
| 77 | Config: userConfig, |
| 78 | Version: 1, |
| 79 | Namespace: "default", |
| 80 | } |
| 81 | |
| 82 | require.NoError(t, cfg.Releases.Create(rel)) |
| 83 | |
| 84 | result, err := client.Run(releaseName) |
| 85 | require.NoError(t, err) |
| 86 | assert.Equal(t, userConfig, result) |
| 87 | } |
| 88 | |
| 89 | func TestGetValues_Run_AllValues(t *testing.T) { |
| 90 | cfg := actionConfigFixture(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…