Commit 7acaa70
102 do not create channel if folder does not exist (#108)
* To check if parent dir exists, use /namespace call instead of /tape/locality
Fixes #105
* Fix unit test
* New function is_dir() interfered with the output of create_path()
* Typo was fixed in ada but should be fixed in unit test as well, to match
* Improve validation for --events and --report-staged
* Ada now checks whether a valid, existing directory is provided
* The order of validation has changed to provide more accurate error messages. When the channel name is missing, Ada will not say the path is missing, but say that the channel name and directory are missing (because if there's no channel name, the path must be missing as well)
* Do path validation after construct_auth()
Because the path validation calls the API and this will fail when the authentication has not been set up.
* Exit when is_dir is used before construct_auth
This should prevent us developers from making this mistake again.
* Fix unit test to match changed output in previous commit
* Fix comment
* Adapt unit test for create_path
---------
Co-authored-by: Haili Hu <hailihu@gmail.com>1 parent 555461b commit 7acaa70
2 files changed
Lines changed: 36 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1130 | 1130 | | |
1131 | 1131 | | |
1132 | 1132 | | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1133 | 1139 | | |
1134 | 1140 | | |
1135 | 1141 | | |
| |||
2160 | 2166 | | |
2161 | 2167 | | |
2162 | 2168 | | |
2163 | | - | |
2164 | | - | |
| 2169 | + | |
2165 | 2170 | | |
2166 | 2171 | | |
2167 | 2172 | | |
| |||
2215 | 2220 | | |
2216 | 2221 | | |
2217 | 2222 | | |
2218 | | - | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
2222 | | - | |
2223 | | - | |
2224 | 2223 | | |
2225 | 2224 | | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
2226 | 2235 | | |
2227 | 2236 | | |
2228 | 2237 | | |
| |||
2743 | 2752 | | |
2744 | 2753 | | |
2745 | 2754 | | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
2746 | 2762 | | |
2747 | 2763 | | |
2748 | 2764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
0 commit comments