(t *testing.T)
| 49 | } |
| 50 | |
| 51 | func TestSetEnvVariables(t *testing.T) { |
| 52 | t.Run("set environment variables success", func(t *testing.T) { |
| 53 | err := SetEnvVariables(map[string]string{ |
| 54 | "testKey": "testValue", |
| 55 | }) |
| 56 | require.NoError(t, err) |
| 57 | assert.Equal(t, "testValue", os.Getenv("testKey")) |
| 58 | }) |
| 59 | t.Run("set environment variables failed", func(t *testing.T) { |
| 60 | err := SetEnvVariables(map[string]string{ |
| 61 | "": "testValue", |
| 62 | }) |
| 63 | require.Error(t, err) |
| 64 | assert.NotEqual(t, "testValue", os.Getenv("")) |
| 65 | }) |
| 66 | } |
| 67 | |
| 68 | func TestGetIntValFromStringVal(t *testing.T) { |
| 69 | tcs := []struct { |
nothing calls this directly
no test coverage detected