Skip to content

Commit

Permalink
Refactor checkMetadata (#17)
Browse files Browse the repository at this point in the history
* Add test - not passing

* Add comments and testdata dir

* Make the tests pass.

* Add more tests

* Check illegal characters

* Fix the tests

* Refactor checkMetadata

* Update TestCheckMetadata_CrashCase

Rename checkIllegalKeys to containsIllegalKeys
  • Loading branch information
kavir1698 authored Mar 27, 2024
1 parent 2f74270 commit 09efe04
Show file tree
Hide file tree
Showing 5 changed files with 283 additions and 231 deletions.
5 changes: 4 additions & 1 deletion cmd/datasetIngestor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ func main() {

/* TODO Add info about policy settings and that autoarchive will take place or not */

metaDataMap, sourceFolder, beamlineAccount := datasetIngestor.CheckMetadata(client, APIServer, metadatafile, user, accessGroups)
metaDataMap, sourceFolder, beamlineAccount, err := datasetIngestor.CheckMetadata(client, APIServer, metadatafile, user, accessGroups)
if err != nil {
log.Fatal("Error in CheckMetadata function: ", err)
}
//log.Printf("metadata object: %v\n", metaDataMap)

// assemble list of folders (=datasets) to created
Expand Down
Loading

0 comments on commit 09efe04

Please sign in to comment.