Skip to content

Commit

Permalink
Clean up test and update stable/maintainence to release/development
Browse files Browse the repository at this point in the history
  • Loading branch information
tdrwenski committed Oct 24, 2023
1 parent 40b5dd0 commit d5e0f31
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
12 changes: 12 additions & 0 deletions project-files/downloads-page/release_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@
"SHA256": "tdm-5.5-SNAPSHOT.jar.sha256"
},
"info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) "
},
"thredds_iso_jar": {
"baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.5/",
"type": "library",
"package": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar",
"name": "THREDDS ISO Plugin (Jar file)",
"hash": {
"MD5": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.md5",
"SHA1": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha1",
"SHA256": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha256"
},
"info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) "
}
}
}, {
Expand Down
35 changes: 11 additions & 24 deletions tds/src/test/java/thredds/server/config/TdsContextTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package thredds.server.config;

import static com.google.common.truth.Truth.assertThat;

import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -25,34 +27,19 @@ public class TdsContextTest {
@Autowired
private TdsContext tdsContext;

/*
* @Test
* public void testInit() {
* System.out.printf("%s%n", tdsContext);
* //All the initialization was done
* //serverInfo, htmlConfig, wmsConfig are initialized by TdsConfigMapper after ThreddConfig reads the
* threddsServer.xml file
* assertNotNull( tdsContext.getServerInfo() );
* assertNotNull( tdsContext.getHtmlConfig() );
* assertNotNull( tdsContext.getWmsConfig() );
* }
*/

@Test
public void testVersionRetrieval() {
String stableKey = "stable";
String maintKey = "maintenance";
String version = tdsContext.getVersionInfo();

Map<String, String> latestVersionInfo = tdsUpdateConfig.getLatestVersionInfo(version);

// is not empty
assert (!latestVersionInfo.isEmpty());
// contains the stable key and the stable version is not empty
assert (latestVersionInfo.containsKey(stableKey));
assert (!latestVersionInfo.get(stableKey).isEmpty());
// contains the dev key and the dev version is not empty
assert (latestVersionInfo.containsKey(maintKey));
assert (!latestVersionInfo.get(maintKey).isEmpty());
assertThat(latestVersionInfo).isNotEmpty();

String releaseKey = "release";
assertThat(latestVersionInfo).containsKey(releaseKey);
assertThat(latestVersionInfo.get(releaseKey)).isNotEmpty();

String developmentKey = "development";
assertThat(latestVersionInfo).containsKey(developmentKey);
assertThat(latestVersionInfo.get(developmentKey)).isNotEmpty();
}
}

0 comments on commit d5e0f31

Please sign in to comment.