(t *testing.T)
| 299 | } |
| 300 | |
| 301 | func TestRemoteProfiles(t *testing.T) { |
| 302 | var validRemoteProfile = &SigningProfile{ |
| 303 | RemoteName: "localhost", |
| 304 | RemoteServer: "localhost:8080", |
| 305 | } |
| 306 | |
| 307 | var invalidRemoteProfile = &SigningProfile{ |
| 308 | RemoteName: "localhost", |
| 309 | } |
| 310 | |
| 311 | var invalidRemoteAuthProfile = &SigningProfile{ |
| 312 | RemoteName: "localhost", |
| 313 | RemoteServer: "localhost:8080", |
| 314 | AuthKeyName: "blahblah", |
| 315 | } |
| 316 | |
| 317 | if !validRemoteProfile.validProfile(true) || |
| 318 | !validRemoteProfile.validProfile(false) { |
| 319 | t.Fatal("valid remote profile is rejected.") |
| 320 | } |
| 321 | |
| 322 | if invalidRemoteProfile.validProfile(true) || |
| 323 | invalidRemoteProfile.validProfile(false) { |
| 324 | t.Fatal("invalid remote profile is accepted.") |
| 325 | } |
| 326 | |
| 327 | if invalidRemoteAuthProfile.validProfile(true) || |
| 328 | invalidRemoteAuthProfile.validProfile(false) { |
| 329 | t.Fatal("invalid remote profile is accepted.") |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | func TestInvalidDefault(t *testing.T) { |
| 334 | if invalidDefaultConfig.Signing.Default.validProfile(true) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…