作者 陈志颖

chore:使用https

... ... @@ -81,7 +81,7 @@ spec:
- name: ABILITY_SERVICE_HOST
value: "https://suplus-worth-app-gateway-dev.fjmaimaimai.com"
- name: MMM_OPEN_API_SERVICE_HOST
value: "http://mmm-open-api-dev.fjmaimaimai.com"
value: "https://mmm-open-api-dev.fjmaimaimai.com"
- name: UCENTER_SERVICE_HOST
value: "https://suplus-ucenter-dev.fjmaimaimai.com"
- name: BUSINESS_ADMIN_SERVICE_HOST
... ...
... ... @@ -81,7 +81,7 @@ spec:
- name: ABILITY_SERVICE_HOST
value: "https://suplus-worth-app-gateway-dev.fjmaimaimai.com"
- name: MMM_OPEN_API_SERVICE_HOST
value: "http://mmm-open-api-dev.fjmaimaimai.com"
value: "https://mmm-open-api-dev.fjmaimaimai.com"
- name: UCENTER_SERVICE_HOST
value: "https://suplus-ucenter-test.fjmaimaimai.com"
- name: BUSINESS_ADMIN_SERVICE_HOST
... ...
... ... @@ -4,14 +4,24 @@ go 1.14
require (
github.com/Shopify/sarama v1.26.4
github.com/ajg/form v1.5.1 // indirect
github.com/astaxie/beego v1.12.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/gavv/httpexpect v2.0.0+incompatible
github.com/gin-gonic/gin v1.5.0
github.com/go-pg/pg/v10 v10.0.0-beta.2
github.com/imkira/go-interpol v1.1.0 // indirect
github.com/linmadan/egglib-go v0.0.0-20191217144343-ca4539f95bf9
github.com/moul/http2curl v1.0.0 // indirect
github.com/onsi/ginkgo v1.15.0
github.com/onsi/gomega v1.10.5
github.com/sergi/go-diff v1.1.0 // indirect
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
github.com/shopspring/decimal v1.2.0
github.com/tiptok/gocomm v1.0.5
github.com/valyala/fasthttp v1.19.0 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
)
... ...
... ... @@ -15,7 +15,7 @@ var MMM_SMS_SERVICE_HOST = "https://sms.fjmaimaimai.com:9897"
var UCENTER_SERVICE_HOST = "https://suplus-ucenter-test.fjmaimaimai.com"
var UCENTER_APP_KEY = "0c2c2a23dfc64ae230f5c54ab243ab52"
var BUSINESS_ADMIN_SERVICE_HOST = "http://suplus-business-admin-test.fjmaimaimai.com"
var BUSINESS_ADMIN_SERVICE_HOST = "https://suplus-business-admin-test.fjmaimaimai.com"
var BUSINESS_ADMIN_PLATFORM_ID = "25" //合伙人模块
var DEFAULT_GUEST_COMPANY int = 358
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
import (
"github.com/gavv/httpexpect"
"github.com/go-pg/pg/v10"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
pG "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
"net/http"
)
var _ = Describe("返回员工", func() {
var employeeId int64
BeforeEach(func() {
_, err := pG.DB.QueryOne(
pg.Scan(&employeeId),
"INSERT INTO partner (id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 2499036607974745088, "employee_name", "employee_account", "employee_avatar_url", 1000.00, 1, pg.Array([]int{1, 3}))
Expect(err).NotTo(HaveOccurred())
})
Describe("根据employeeId参数返回员工", func() {
Context("传入有效的employeeId", func() {
It("返回员工数据", func() {
httpExpect := httpexpect.New(GinkgoT(), server.URL)
httpExpect.GET("/employees/2499036607974745088").
Expect().
Status(http.StatusOK).
JSON().
Object().
ContainsKey("code").ValueEqual("code", 0).
ContainsKey("msg").ValueEqual("msg", "ok").
ContainsKey("data").Value("data").Object()
})
})
})
AfterEach(func() {
_, err := pG.DB.Exec("DELETE FROM employees WHERE true")
Expect(err).NotTo(HaveOccurred())
})
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package company
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Company Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package dividend
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Dividend Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package order
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Order Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package partner
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Partner Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package user
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port User Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...