-
-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gateway): impl gateway crd and opt route&domain crd (#313)
* feat(gateway): impl gateway crd and opt route&domain crd * feat(gateway):update manifests * feat(gateway): update app route * feat(gateway): update bucket route * feat(gateway): opt controller
- Loading branch information
Showing
14 changed files
with
586 additions
and
151 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,30 +1 @@ | ||
package apisix | ||
|
||
import "testing" | ||
|
||
func TestCreateRoute(t *testing.T) { | ||
// 创建RouteClient | ||
routeClient := NewRouteClient("http://localhost:9180", "edd1c9f034335f136f87ad84b625c8f1") | ||
routeData := map[string]interface{}{ | ||
"uri": "/hello", | ||
"upstream": map[string]interface{}{ | ||
"type": "roundrobin", | ||
"nodes": map[string]interface{}{ | ||
"baidu.com": 1, | ||
}, | ||
}, | ||
"host": "test.com", | ||
} | ||
err := routeClient.PutRoute("test", routeData) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
|
||
func TestDeleteRoute(t *testing.T) { | ||
routeClient := NewRouteClient("http://localhost:9180", "edd1c9f034335f136f87ad84b625c8f1") | ||
err := routeClient.DeleteRoute("test") | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |
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.