Skip to content

Commit 1c84a6a

Browse files
Fixed test
1 parent 245ea97 commit 1c84a6a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tpu/src/main/java/tpu/CreateQueuedResourceWithStartupScript.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public static QueuedResource createQueuedResource(
7676
.setTotalTimeout(Duration.ofHours(24L))
7777
.build());
7878
String parent = String.format("projects/%s/locations/%s", projectId, zone);
79-
// Read the startup script content from the file
8079
String startupScriptContent = "#!/bin/bash\necho \"Hello from the startup script!\"";
8180
// Add startup script to metadata
8281
Map<String, String> metadata = new HashMap<>();

tpu/src/test/java/tpu/QueuedResourceIT.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ public void testCreateQueuedResourceWithStartupScript() throws Exception {
8787
PROJECT_ID, ZONE, QUEUED_RESOURCE_FOR_SCRIPT, NODE_FOR_SCRIPT,
8888
TPU_TYPE, TPU_SOFTWARE_VERSION);
8989

90-
assertThat(queuedResource.getTpu().getNodeSpec(0).getNode().containsLabels("startup-script"));
91-
assertThat(queuedResource.getTpu().getNodeSpec(0).getNode().getLabelsMap()
92-
.containsValue("Hello from the startup script!"));
90+
System.out.println(queuedResource.getTpu().getNodeSpec(0).getNode().getMetadataMap());
91+
assertThat(queuedResource.getTpu().getNodeSpec(0).getNode().containsMetadata("startup-script"));
92+
assertThat(queuedResource.getTpu().getNodeSpec(0).getNode().getMetadataMap()
93+
.containsValue("#!/bin/bash\n"
94+
+ "echo \"Hello from the startup script!\""));
9395
}
9496
}

0 commit comments

Comments
 (0)