Skip to content

Commit 65c8897

Browse files
committed
CMR-7610: Fixed library loading issue.
1 parent 7e57930 commit 65c8897

File tree

4 files changed

+197
-3
lines changed

4 files changed

+197
-3
lines changed
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
{
2+
"Name": "This Tool broke some tests",
3+
"LongName": "Isn't it ironic that a tool would be the one to break something?",
4+
"Version": "1.0",
5+
"VersionDescription": "Description of the version of the tool.",
6+
"Type": "Downloadable Tool",
7+
"LastUpdatedDate": "2020-05-01T00:00:00Z",
8+
"Description": "Description of the factory made tool.",
9+
"DOI": "https://doi.org/10.1234/SOMEDAAC/5678",
10+
"URL": {
11+
"Description": "Access the WRS-2 Path/Row to Latitude/Longitude Converter.",
12+
"URLContentType": "DistributionURL",
13+
"Type": "DOWNLOAD SOFTWARE",
14+
"Subtype": "MOBILE APP",
15+
"URLValue": "http://www.scp.byu.edu/software/slice_response/Xshape_temp.html"
16+
},
17+
"RelatedURLs": [
18+
{
19+
"Description": "Test related url",
20+
"URLContentType": "VisualizationURL",
21+
"Type": "GET RELATED VISUALIZATION",
22+
"Subtype": "MAP",
23+
"URL": "nasa.gov"
24+
},
25+
{
26+
"Description": "Test another related url",
27+
"URLContentType": "PublicationURL",
28+
"Type": "VIEW RELATED INFORMATION",
29+
"Subtype": "ALGORITHM DOCUMENTATION",
30+
"URL": "algorithms.org"
31+
}
32+
],
33+
"SupportedInputFormats": ["GEOTIFFFLOAT32", "ICARTT"],
34+
"SupportedOutputFormats": ["KML", "NETCDF-4"],
35+
"SupportedOperatingSystems": [
36+
{
37+
"OperatingSystemName": "Puppy Linux",
38+
"OperatingSystemVersion": "8.8"
39+
},
40+
{
41+
"OperatingSystemName": "Tails",
42+
"OperatingSystemVersion": "9.5"
43+
}
44+
],
45+
"SupportedBrowsers": [
46+
{
47+
"BrowserName": "3B",
48+
"BrowserVersion": "3.0"
49+
},
50+
{
51+
"BrowserName": "Retawq",
52+
"BrowserVersion": "1.1"
53+
}
54+
],
55+
"SupportedSoftwareLanguages": [
56+
{
57+
"SoftwareLanguageName": "LOLCODE",
58+
"SoftwareLanguageVersion": "LOL"
59+
},
60+
{
61+
"SoftwareLanguageName": "Chicken",
62+
"SoftwareLanguageVersion": "Chicken Chicken Chicken Chicken"
63+
}
64+
],
65+
"Quality": {
66+
"QualityFlag": "Reviewed",
67+
"Traceability": "traceability",
68+
"Lineage": "lineage"
69+
},
70+
"AccessConstraints": "access constraint 1",
71+
"UseConstraints": {
72+
"LicenseURL": "tool.license.boo",
73+
"LicenseText": "license text text license"
74+
},
75+
"ToolKeywords": [
76+
{
77+
"ToolCategory": "EARTH SCIENCE SERVICES",
78+
"ToolTopic": "DATA ANALYSIS AND VISUALIZATION",
79+
"ToolTerm": "GEOGRAPHIC INFORMATION SYSTEMS",
80+
"ToolSpecificTerm": "DESKTOP GEOGRAPHIC INFORMATION SYSTEMS"
81+
},
82+
{
83+
"ToolCategory": "EARTH SCIENCE SERVICES",
84+
"ToolTopic": "DATA ANALYSIS AND VISUALIZATION",
85+
"ToolTerm": "GEOGRAPHIC INFORMATION SYSTEMS",
86+
"ToolSpecificTerm": "MOBILE GEOGRAPHIC INFORMATION SYSTEMS"
87+
}
88+
],
89+
"AncillaryKeywords": ["Ancillary keyword 1", "Ancillary keyword 2"],
90+
"Organizations": [
91+
{
92+
"Roles": ["SERVICE PROVIDER", "DEVELOPER"],
93+
"ShortName": "UCAR/NCAR/EOL/CEOPDM",
94+
"LongName": "CEOP Data Management, Earth Observing Laboratory, National Center for Atmospheric Research, University Corporation for Atmospheric Research",
95+
"URLValue": "http://www.eol.ucar.edu/projects/ceop/dm/"
96+
},
97+
{
98+
"Roles": ["PUBLISHER"],
99+
"ShortName": "AARHUS-HYDRO",
100+
"LongName": "Hydrogeophysics Group, Aarhus University "
101+
}
102+
],
103+
"ContactGroups": [
104+
{
105+
"Roles": ["SERVICE PROVIDER", "PUBLISHER"],
106+
"GroupName": "Group 1",
107+
"ContactInformation": {
108+
"ServiceHours": "9-6, M-F",
109+
"ContactInstruction": "Email only",
110+
"ContactMechanisms": [
111+
{
112+
"Type": "Email",
113+
"Value": "[email protected]"
114+
}, {
115+
"Type": "Email",
116+
"Value": "[email protected]"
117+
}
118+
],
119+
"Addresses": [
120+
{
121+
"StreetAddresses": ["300 E Street Southwest", "Room 203", "Address line 3"],
122+
"City": "Washington",
123+
"StateProvince": "DC",
124+
"PostalCode": "20546",
125+
"Country": "United States"
126+
},
127+
{
128+
"StreetAddresses": ["8800 Greenbelt Road"],
129+
"City": "Greenbelt",
130+
"StateProvince": "MD",
131+
"PostalCode": "20771",
132+
"Country": "United States"
133+
}
134+
]
135+
}
136+
},
137+
{
138+
"Roles": ["SERVICE PROVIDER"],
139+
"GroupName": "Group 2"
140+
}
141+
],
142+
"ContactPersons": [
143+
{
144+
"Roles": ["DEVELOPER", "SERVICE PROVIDER"],
145+
"ContactInformation": {
146+
"ContactMechanisms": [
147+
{
148+
"Type": "Email",
149+
"Value": "[email protected]"
150+
}, {
151+
"Type": "Fax",
152+
"Value": "800-555-1212"
153+
}
154+
],
155+
"Addresses": [
156+
{
157+
"StreetAddresses": ["47914 252nd Street"],
158+
"City": "Sioux Falls",
159+
"StateProvince": "SD",
160+
"Country": "USA",
161+
"PostalCode": "57198-0001"
162+
}
163+
]
164+
},
165+
"FirstName": "Service Provider Personnel First Name",
166+
"MiddleName": "Service Provider Personnel Middle Name",
167+
"LastName": "Service Provider Personnel Last Name"
168+
},
169+
{
170+
"Roles": ["DEVELOPER"],
171+
"LastName": "Last 2"
172+
}
173+
],
174+
"SearchAction": {
175+
"SearchActionElement": "A little chant may not seem like a real spell, but it can still bring magickal results if you put your heart into it. Use this spell when you are looking for something you've misplaced in your home. You just need a white candle. Light the candle, and put it in a holder that is easy to carry. Begin to walk from room to room with it, repeating the following: I need what I seek Give me a peek Draw my eyes For my prize. Let your eyes wander around until you feel drawn to the spot where your missing item is hiding."
176+
},
177+
"MetadataSpecification": {
178+
"URL": "https://cdn.earthdata.nasa.gov/umm/tool/v1.0",
179+
"Name": "UMM-T",
180+
"Version": "1.0"
181+
}
182+
}

system-int-test/test/cmr/system_int_test/ingest/tool_ingest_test.clj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[cmr.common.log :as log :refer (debug info warn error)]
77
[cmr.common.util :refer [are3]]
88
[cmr.mock-echo.client.echo-util :as echo-util]
9+
[cmr.system-int-test.data2.core :as d]
910
[cmr.system-int-test.system :as system]
1011
[cmr.system-int-test.utils.ingest-util :as ingest]
1112
[cmr.system-int-test.utils.metadata-db-util :as mdb]
@@ -206,3 +207,13 @@
206207
{:keys [status concept-id revision-id]} response]
207208
(is (= 200 status))
208209
(is (= 3 revision-id)))))))
210+
211+
(deftest old-version-tool-ingest-test
212+
(testing "Ingest of an older version of Tool concept that requires migration"
213+
(let [{:keys [status]} (d/ingest-concept-with-metadata-file
214+
"CMR-7610/umm_t_v_1_0.json"
215+
{:concept-type :tool
216+
:provider-id "PROV1"
217+
:native-id "tool_v_1.0"
218+
:format "application/vnd.nasa.cmr.umm+json; version=1.0"})]
219+
(is (= 201 status)))))

umm-spec-lib/src/cmr/umm_spec/migration/version/core.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[clojure.set :as set]
55
[clojure.string :as string]
66
[cmr.common-app.services.kms-fetcher :as kf]
7-
[cmr.common.mime-types :as mt]
87
[cmr.common.log :as log]
8+
[cmr.common.mime-types :as mt]
99
[cmr.common.util :as util :refer [update-in-each]]
1010
[cmr.umm-spec.dif-util :as dif-util]
1111
[cmr.umm-spec.location-keywords :as lk]
@@ -18,8 +18,9 @@
1818
[cmr.umm-spec.migration.version.collection]
1919
[cmr.umm-spec.migration.version.granule]
2020
[cmr.umm-spec.migration.version.interface :as interface]
21-
[cmr.umm-spec.migration.version.variable]
2221
[cmr.umm-spec.migration.version.service]
22+
[cmr.umm-spec.migration.version.tool]
23+
[cmr.umm-spec.migration.version.variable]
2324
[cmr.umm-spec.spatial-conversion :as spatial-conversion]
2425
[cmr.umm-spec.util :as u]
2526
[cmr.umm-spec.versioning :as versioning]

umm-spec-lib/test/cmr/umm_spec/test/migration/version/tool.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
:ShortName "USGS/EROS"
3131
:LongName "US GEOLOGICAL SURVEY EARTH RESOURCE OBSERVATION AND SCIENCE (EROS) LANDSAT CUSTOMER SERVICES"
3232
:URLValue "http://www.usgs.gov"}]
33-
:SearchAction "smart handoff search action"
33+
:SearchAction {:SearchActionElement "smart handoff search action"}
3434
:MetadataSpecification {:URL "https://cdn.earthdata.nasa.gov/umm/tool/v1.0"
3535
:Name "UMM-T"
3636
:Version "1.0"}})

0 commit comments

Comments
 (0)