RussellSpitzer commented on code in PR #12949:
URL: https://github.com/apache/iceberg/pull/12949#discussion_r2071809728


##########
api/src/test/java/org/apache/iceberg/TestIcebergBuild.java:
##########
@@ -37,6 +41,26 @@ public void testFullVersion() {
                 + ")");
   }
 
+  @Test
+  public void testVersionNotUnspecified() {
+    assertThat(IcebergBuild.version()).isNotEqualTo("unspecified");
+  }
+
+  /**
+   * This test is for Source Releases. When we have a source release we use a 
version.txt file in
+   * the parent directory of this module to actually set the "version" which 
should be included in
+   * the gradle build properties used by IcebergBuild.
+   */
+  @Test
+  public void testVersionMatchesFile() throws IOException {
+    Path versionPath = Paths.get("../version.txt").toAbsolutePath();
+    assumeThat(java.nio.file.Files.exists(versionPath)).isTrue();

Review Comment:
   I think that's a good suggestion, but I really want to test that file. I'm 
trying to test against the thing we *know* must be correct. We basically 
directly pipe this value into version.txt in our source-release script. If we 
somehow bungle gradle in the future and that value doesn't match the text file 
for whatever reason I'd like to know. I can add this test as well as an assert 
though



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to