(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func TestBuildVolumeMount(t *testing.T) { |
| 69 | project := composetypes.Project{ |
| 70 | Name: "myProject", |
| 71 | Volumes: composetypes.Volumes(map[string]composetypes.VolumeConfig{ |
| 72 | "myVolume": { |
| 73 | Name: "myProject_myVolume", |
| 74 | }, |
| 75 | }), |
| 76 | } |
| 77 | volume := composetypes.ServiceVolumeConfig{ |
| 78 | Type: composetypes.VolumeTypeVolume, |
| 79 | Source: "myVolume", |
| 80 | Target: "/data", |
| 81 | } |
| 82 | mount, err := buildMount(project, volume) |
| 83 | assert.NilError(t, err) |
| 84 | assert.Equal(t, mount.Source, "myProject_myVolume") |
| 85 | assert.Equal(t, mount.Type, mountTypes.TypeVolume) |
| 86 | } |
| 87 | |
| 88 | func TestServiceImageName(t *testing.T) { |
| 89 | assert.Equal(t, api.GetImageNameOrDefault(composetypes.ServiceConfig{Image: "myImage"}, "myProject"), "myImage") |
nothing calls this directly
no test coverage detected