Skip to content

Commit

Permalink
test: remove python code (pingcap#699) (pingcap#700)
Browse files Browse the repository at this point in the history
* cherry pick pingcap#699 to release-4.0

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* fix conflict

Co-authored-by: 3pointer <luancheng@pingcap.com>
  • Loading branch information
ti-srebot and 3pointer authored Jan 18, 2021
1 parent e8a906b commit 00bf666
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ build_for_integration_test:
-o bin/br.test && \
$(GOBUILD) $(RACEFLAG) -o bin/locker tests/br_key_locked/*.go && \
$(GOBUILD) $(RACEFLAG) -o bin/gc tests/br_z_gc_safepoint/*.go && \
$(GOBUILD) $(RACEFLAG) -o bin/oauth tests/br_gcs/*.go && \
$(GOBUILD) $(RACEFLAG) -o bin/rawkv tests/br_rawkv/*.go) || (make failpoint-disable && exit 1)
@make failpoint-disable

Expand Down
25 changes: 25 additions & 0 deletions tests/br_gcs/oauth.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2020 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
"net/http"
)

func main() {
http.HandleFunc("/oauth/token", func(w http.ResponseWriter, r *http.Request) {
_, _ = w.Write([]byte(`{"access_token": "ok", "token_type":"service_account", "expires_in":3600}`))
})
_ = http.ListenAndServe(":5000", nil)
}
9 changes: 0 additions & 9 deletions tests/br_gcs/oauth.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/br_gcs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ while ! curl -o /dev/null -v -s "http://$GCS_HOST:$GCS_PORT/"; do
done

# start oauth server
killall flask || true
FLASK_APP=tests/$TEST_NAME/oauth.py flask run &
bin/oauth &
OAUTH_ID=$!

stop_gcs() {
kill -2 $GCS_ID
Expand Down

0 comments on commit 00bf666

Please sign in to comment.