mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-05 18:20:37 +01:00
Remove the token attribute for robot table
This commit is to remove the token attribute as harbor doesn't store the token in DB. Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
parent
e12fd13c56
commit
5d6a28d73e
@ -1,10 +1,6 @@
|
||||
CREATE TABLE robot (
|
||||
id SERIAL PRIMARY KEY NOT NULL,
|
||||
name varchar(255),
|
||||
/*
|
||||
The maximum length of token is 7k
|
||||
*/
|
||||
token varchar(7168),
|
||||
description varchar(1024),
|
||||
project_id int,
|
||||
disabled boolean DEFAULT false NOT NULL,
|
||||
|
@ -27,7 +27,6 @@ func TestAddRobot(t *testing.T) {
|
||||
robotName := "test1"
|
||||
robot := &models.Robot{
|
||||
Name: robotName,
|
||||
Token: "rKgjKEMpMEK23zqejkWn5GIVvgJps1vKACTa6tnGXXyOlOTsXFESccDvgaJx047q1",
|
||||
Description: "test1 description",
|
||||
ProjectID: 1,
|
||||
}
|
||||
@ -46,7 +45,6 @@ func TestGetRobot(t *testing.T) {
|
||||
robotName := "test2"
|
||||
robot := &models.Robot{
|
||||
Name: robotName,
|
||||
Token: "rKgjKEMpMEK23zqejkWn5GIVvgJps1vKACTa6tnGXXyOlOTsXFESccDvgaJx047q2",
|
||||
Description: "test2 description",
|
||||
ProjectID: 1,
|
||||
}
|
||||
@ -66,7 +64,6 @@ func TestListRobots(t *testing.T) {
|
||||
robotName := "test3"
|
||||
robot := &models.Robot{
|
||||
Name: robotName,
|
||||
Token: "rKgjKEMpMEK23zqejkWn5GIVvgJps1vKACTa6tnGXXyOlOTsXFESccDvgaJx047q3",
|
||||
Description: "test3 description",
|
||||
ProjectID: 1,
|
||||
}
|
||||
@ -86,7 +83,6 @@ func TestDisableRobot(t *testing.T) {
|
||||
robotName := "test4"
|
||||
robot := &models.Robot{
|
||||
Name: robotName,
|
||||
Token: "rKgjKEMpMEK23zqejkWn5GIVvgJps1vKACTa6tnGXXyOlOTsXFESccDvgaJx047q4",
|
||||
Description: "test4 description",
|
||||
ProjectID: 1,
|
||||
}
|
||||
@ -111,7 +107,6 @@ func TestEnableRobot(t *testing.T) {
|
||||
robotName := "test5"
|
||||
robot := &models.Robot{
|
||||
Name: robotName,
|
||||
Token: "rKgjKEMpMEK23zqejkWn5GIVvgJps1vKACTa6tnGXXyOlOTsXFESccDvgaJx047q5",
|
||||
Description: "test5 description",
|
||||
Disabled: true,
|
||||
ProjectID: 1,
|
||||
@ -137,7 +132,6 @@ func TestDeleteRobot(t *testing.T) {
|
||||
robotName := "test6"
|
||||
robot := &models.Robot{
|
||||
Name: robotName,
|
||||
Token: "rKgjKEMpMEK23zqejkWn5GIVvgJps1vKACTa6tnGXXyOlOTsXFESccDvgaJx047q6",
|
||||
Description: "test6 description",
|
||||
ProjectID: 1,
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ const RobotTable = "robot"
|
||||
type Robot struct {
|
||||
ID int64 `orm:"pk;auto;column(id)" json:"id"`
|
||||
Name string `orm:"column(name)" json:"name"`
|
||||
Token string `orm:"column(token)" json:"token"`
|
||||
Description string `orm:"column(description)" json:"description"`
|
||||
ProjectID int64 `orm:"column(project_id)" json:"project_id"`
|
||||
Disabled bool `orm:"column(disabled)" json:"disabled"`
|
||||
|
Loading…
Reference in New Issue
Block a user