-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds remaining endpoints for UI PoC (#397)
* Simplifies and improves accuracy of API tests Signed-off-by: Alex Creasy <[email protected]> * Adds an API endpoint to get a ModelVersion by ID Signed-off-by: Alex Creasy <[email protected]> * Adds an API endpoint to create ModelVersions Signed-off-by: Alex Creasy <[email protected]> * Adds an API endpoint to update ModelVersions Signed-off-by: Alex Creasy <[email protected]> * Adds an API endpoint to get all ModelVersions for a given RegisteredModel Signed-off-by: Alex Creasy <[email protected]> * Adds an API endpoint to create a ModelVersion for a given RegisteredModel Signed-off-by: Alex Creasy <[email protected]> * Adds an API endpoint to get all ModelArtifacts for a given ModelVersion Signed-off-by: Alex Creasy <[email protected]> * Adds an API endpoint to create a ModelArtifact for a given ModelVersion Signed-off-by: Alex Creasy <[email protected]> --------- Signed-off-by: Alex Creasy <[email protected]>
- Loading branch information
1 parent
e5422f7
commit 8dbc2e7
Showing
21 changed files
with
1,360 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package api | ||
|
||
import ( | ||
"github.com/stretchr/testify/assert" | ||
"testing" | ||
) | ||
|
||
func TestParseURLTemplate(t *testing.T) { | ||
expected := "/v1/model_registry/demo-registry/registered_models/111-222-333/versions" | ||
tmpl := "/v1/model_registry/:model_registry_id/registered_models/:registered_model_id/versions" | ||
params := map[string]string{"model_registry_id": "demo-registry", "registered_model_id": "111-222-333"} | ||
|
||
actual := ParseURLTemplate(tmpl, params) | ||
|
||
assert.Equal(t, expected, actual) | ||
} | ||
|
||
func TestParseURLTemplateWhenEmpty(t *testing.T) { | ||
actual := ParseURLTemplate("", nil) | ||
assert.Empty(t, actual) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.