You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/src/handlers/http/modal/mod.rs
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,7 @@ pub struct IngestorMetadata {
62
62
pubbucket_name:String,
63
63
pubtoken:String,
64
64
pubingestor_id:String,
65
+
pubflight_port:String,
65
66
}
66
67
67
68
implIngestorMetadata{
@@ -73,6 +74,7 @@ impl IngestorMetadata {
73
74
username:&str,
74
75
password:&str,
75
76
ingestor_id:String,
77
+
flight_port:String,
76
78
) -> Self{
77
79
let token = base64::prelude::BASE64_STANDARD.encode(format!("{}:{}", username, password));
78
80
@@ -85,6 +87,7 @@ impl IngestorMetadata {
85
87
bucket_name,
86
88
token,
87
89
ingestor_id,
90
+
flight_port,
88
91
}
89
92
}
90
93
@@ -110,9 +113,10 @@ mod test {
110
113
"admin",
111
114
"admin",
112
115
"ingestor_id".to_string(),
116
+
"8002".to_string(),
113
117
);
114
118
115
-
let rhs = serde_json::from_slice::<IngestorMetadata>(br#"{"version":"v3","port":"8000","domain_name":"https://localhost:8000","bucket_name":"somebucket","token":"Basic YWRtaW46YWRtaW4=", "ingestor_id": "ingestor_id"}"#).unwrap();
119
+
let rhs = serde_json::from_slice::<IngestorMetadata>(br#"{"version":"v3","port":"8000","domain_name":"https://localhost:8000","bucket_name":"somebucket","token":"Basic YWRtaW46YWRtaW4=", "ingestor_id": "ingestor_id","flight_port": "8002"}"#).unwrap();
116
120
117
121
assert_eq!(rhs, lhs);
118
122
}
@@ -127,13 +131,14 @@ mod test {
127
131
"admin",
128
132
"admin",
129
133
"ingestor_id".to_string(),
134
+
"8002".to_string(),
130
135
);
131
136
132
137
let lhs = serde_json::to_string(&im)
133
138
.unwrap()
134
139
.try_into_bytes()
135
140
.unwrap();
136
-
let rhs = br#"{"version":"v3","port":"8000","domain_name":"https://localhost:8000","bucket_name":"somebucket","token":"Basic YWRtaW46YWRtaW4=","ingestor_id":"ingestor_id"}"#
141
+
let rhs = br#"{"version":"v3","port":"8000","domain_name":"https://localhost:8000","bucket_name":"somebucket","token":"Basic YWRtaW46YWRtaW4=","ingestor_id":"ingestor_id","flight_port":"8002"}"#
0 commit comments