mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 17:37:13 +02:00
Migrate from containsAllOf to containsAtLeast
The two behave identically, and containsAllOf is being removed. More information: [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=246791491
This commit is contained in:
parent
e1f8817746
commit
1480181fe1
3 changed files with 6 additions and 6 deletions
|
@ -768,7 +768,7 @@ public class RdeStagingActionTest extends MapreduceTestCase<RdeStagingAction> {
|
||||||
ImmutableList.copyOf(listResult).stream().map(ListItem::getName).collect(toImmutableSet());
|
ImmutableList.copyOf(listResult).stream().map(ListItem::getName).collect(toImmutableSet());
|
||||||
for (String tld : tlds) {
|
for (String tld : tlds) {
|
||||||
assertThat(filenames)
|
assertThat(filenames)
|
||||||
.containsAllOf(
|
.containsAtLeast(
|
||||||
"manual/test/" + tld + "_2000-01-01_full_S1_R" + revision + "-report.xml.ghostryde",
|
"manual/test/" + tld + "_2000-01-01_full_S1_R" + revision + "-report.xml.ghostryde",
|
||||||
"manual/test/" + tld + "_2000-01-01_full_S1_R" + revision + ".xml.ghostryde",
|
"manual/test/" + tld + "_2000-01-01_full_S1_R" + revision + ".xml.ghostryde",
|
||||||
"manual/test/" + tld + "_2000-01-01_full_S1_R" + revision + ".xml.length",
|
"manual/test/" + tld + "_2000-01-01_full_S1_R" + revision + ".xml.length",
|
||||||
|
|
|
@ -277,7 +277,7 @@ public class RequestAuthenticatorTest {
|
||||||
assertThat(authResult.get().userAuthInfo().get().isUserAdmin()).isFalse();
|
assertThat(authResult.get().userAuthInfo().get().isUserAdmin()).isFalse();
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo()).isPresent();
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo()).isPresent();
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().authorizedScopes())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().authorizedScopes())
|
||||||
.containsAllOf("test-scope1", "test-scope2");
|
.containsAtLeast("test-scope1", "test-scope2");
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().oauthClientId())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().oauthClientId())
|
||||||
.isEqualTo("test-client-id");
|
.isEqualTo("test-client-id");
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().rawAccessToken())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().rawAccessToken())
|
||||||
|
@ -300,7 +300,7 @@ public class RequestAuthenticatorTest {
|
||||||
assertThat(authResult.get().userAuthInfo().get().isUserAdmin()).isTrue();
|
assertThat(authResult.get().userAuthInfo().get().isUserAdmin()).isTrue();
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo()).isPresent();
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo()).isPresent();
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().authorizedScopes())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().authorizedScopes())
|
||||||
.containsAllOf("test-scope1", "test-scope2");
|
.containsAtLeast("test-scope1", "test-scope2");
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().oauthClientId())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().oauthClientId())
|
||||||
.isEqualTo("test-client-id");
|
.isEqualTo("test-client-id");
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().rawAccessToken())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().rawAccessToken())
|
||||||
|
@ -369,7 +369,7 @@ public class RequestAuthenticatorTest {
|
||||||
assertThat(authResult.get().userAuthInfo().get().isUserAdmin()).isFalse();
|
assertThat(authResult.get().userAuthInfo().get().isUserAdmin()).isFalse();
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo()).isPresent();
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo()).isPresent();
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().authorizedScopes())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().authorizedScopes())
|
||||||
.containsAllOf("test-scope1", "test-scope2", "test-scope3");
|
.containsAtLeast("test-scope1", "test-scope2", "test-scope3");
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().oauthClientId())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().oauthClientId())
|
||||||
.isEqualTo("test-client-id");
|
.isEqualTo("test-client-id");
|
||||||
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().rawAccessToken())
|
assertThat(authResult.get().userAuthInfo().get().oauthTokenInfo().get().rawAccessToken())
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class GenerateDnsReportCommandTest extends CommandTestCase<GenerateDnsRep
|
||||||
runCommand("--output=" + output, "--tld=xn--q9jyb4c");
|
runCommand("--output=" + output, "--tld=xn--q9jyb4c");
|
||||||
Iterable<?> output = (Iterable<?>) getOutputAsJson();
|
Iterable<?> output = (Iterable<?>) getOutputAsJson();
|
||||||
assertThat(output).containsAnyOf(DOMAIN1_OUTPUT, DOMAIN1_OUTPUT_ALT);
|
assertThat(output).containsAnyOf(DOMAIN1_OUTPUT, DOMAIN1_OUTPUT_ALT);
|
||||||
assertThat(output).containsAllOf(DOMAIN2_OUTPUT, NAMESERVER1_OUTPUT, NAMESERVER2_OUTPUT);
|
assertThat(output).containsAtLeast(DOMAIN2_OUTPUT, NAMESERVER1_OUTPUT, NAMESERVER2_OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -179,7 +179,7 @@ public class GenerateDnsReportCommandTest extends CommandTestCase<GenerateDnsRep
|
||||||
runCommand("--output=" + output, "--tld=xn--q9jyb4c");
|
runCommand("--output=" + output, "--tld=xn--q9jyb4c");
|
||||||
Iterable<?> output = (Iterable<?>) getOutputAsJson();
|
Iterable<?> output = (Iterable<?>) getOutputAsJson();
|
||||||
assertThat(output).containsAnyOf(DOMAIN1_OUTPUT, DOMAIN1_OUTPUT_ALT);
|
assertThat(output).containsAnyOf(DOMAIN1_OUTPUT, DOMAIN1_OUTPUT_ALT);
|
||||||
assertThat(output).containsAllOf(DOMAIN2_OUTPUT, NAMESERVER2_OUTPUT);
|
assertThat(output).containsAtLeast(DOMAIN2_OUTPUT, NAMESERVER2_OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue