-
Notifications
You must be signed in to change notification settings - Fork 39
Prohibit the use of / in component names #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
58c1259
5a1447e
222a9d9
00e56d8
f0bf417
83f3820
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,24 @@ end | |
| @test_throws ArgumentError IS.set_name!(data, component2, new_name) | ||
| end | ||
|
|
||
| @testset "Test invalid component name characters" begin | ||
| data = IS.SystemData() | ||
| component_slash = IS.TestComponent("E/W", 5) | ||
| @test_throws ArgumentError IS.add_component!(data, component_slash) | ||
|
|
||
| valid_component = IS.TestComponent("valid-name", 5) | ||
| IS.add_component!(data, valid_component) | ||
| @test_throws ArgumentError IS.set_name!(data, valid_component, "invalid/name") | ||
| @test IS.get_name(valid_component) == "valid-name" | ||
|
|
||
| withenv("SIENNA_DISABLE_COMPONENT_NAME_CHECKS" => "true") do | ||
| data2 = IS.SystemData() | ||
| slash_component = IS.TestComponent("E/W", 5) | ||
| IS.add_component!(data2, slash_component) | ||
| @test IS.get_name(slash_component) == "E/W" | ||
|
Comment on lines
+90
to
+94
|
||
| end | ||
| end | ||
|
|
||
| @testset "Test masked components" begin | ||
| data = IS.SystemData() | ||
| initial_time = Dates.DateTime("2020-09-01") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josephmckinsey we need to enforce this somewhere in the DB and Schema for the existing versions that's fine but in the future IS4 and PSY6 we should eliminate it