good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
goutil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
goutil
Commits
0cb8baa8
Commit
0cb8baa8
authored
Apr 29, 2022
by
a
Browse files
Options
Downloads
Patches
Plain Diff
more tests
parent
a6927418
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#871
failed
Apr 29, 2022
Stage: test
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+2
-3
2 additions, 3 deletions
.gitlab-ci.yml
Makefile
+0
-7
0 additions, 7 deletions
Makefile
filing/fs_actions/_sync_test.go
+0
-0
0 additions, 0 deletions
filing/fs_actions/_sync_test.go
filing/fs_weed/weed_test.go
+0
-60
0 additions, 60 deletions
filing/fs_weed/weed_test.go
with
2 additions
and
70 deletions
.gitlab-ci.yml
+
2
−
3
View file @
0cb8baa8
test-libs
:
test-libs
:
stage
:
test
stage
:
test
image
:
golang:1.1
7
-alpine3.15
image
:
golang:1.1
8
-alpine3.15
script
:
script
:
-
apk add make
-
go test ./...
-
make test_all
This diff is collapsed.
Click to expand it.
Makefile
deleted
100644 → 0
+
0
−
7
View file @
a6927418
tidy
:
go mod tidy
test_all
:
test_bufpool
test_bufpool
:
cd
bufpool
&&
go
test
-bench
=
.
This diff is collapsed.
Click to expand it.
filing/fs_actions/sync_test.go
→
filing/fs_actions/
_
sync_test.go
+
0
−
0
View file @
0cb8baa8
File moved
This diff is collapsed.
Click to expand it.
filing/fs_weed/weed_test.go
deleted
100644 → 0
+
0
−
60
View file @
a6927418
package
fs_weed_test
import
(
"log"
"net/http"
"os"
"testing"
"gfx.cafe/open/goutil/filing/api_weed"
"gfx.cafe/open/goutil/filing/fs_weed"
"gfx.cafe/open/goutil/httpclient"
)
func
TestHashUnicode
(
t
*
testing
.
T
)
{
url
:=
os
.
Getenv
(
"FILER_ADDR"
)
user
:=
os
.
Getenv
(
"FILER_USER"
)
pass
:=
os
.
Getenv
(
"FILER_PASS"
)
client
:=
api_weed
.
NewClient
(
httpclient
.
New
(
http
.
DefaultClient
)
.
WithGFX
(
user
,
pass
))
filer
:=
fs_weed
.
New
(
url
,
client
)
log
.
Println
(
filer
.
ListFiles
())
wow
,
err
:=
filer
.
OpenFile
(
"narwhal.png"
,
0
,
0
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed to open file: %s"
,
err
)
}
defer
wow
.
Close
()
wow2
,
err
:=
filer
.
OpenFile
(
"narwhal2.png"
,
0
,
0
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed to open file: %s"
,
err
)
}
defer
wow
.
Close
()
wowhash
:=
wow
.
Hash
()
wow2hash
:=
wow2
.
Hash
()
if
wowhash
==
0
||
wow2hash
==
0
{
t
.
Fatalf
(
"expected hash %d and %d to not be 0"
,
wowhash
,
wow2hash
)
}
if
wowhash
!=
wow2hash
{
t
.
Fatalf
(
"expected hash %d to equal %d"
,
wowhash
,
wow2hash
)
}
wowdat
,
err
:=
wow
.
Data
()
if
err
!=
nil
{
t
.
Fatalf
(
"failed to read data for wow"
)
}
wow2dat
,
err
:=
wow2
.
Data
()
if
err
!=
nil
{
t
.
Fatalf
(
"failed to read data for wow2"
)
}
if
len
(
wowdat
)
==
0
||
len
(
wow2dat
)
==
0
{
t
.
Fatalf
(
"expected data %s and %s to not be len 0"
,
wowdat
,
wow2dat
)
}
if
string
(
wowdat
)
!=
string
(
wow2dat
)
{
t
.
Fatalf
(
"expected data %s to equal %s"
,
wowdat
,
wow2dat
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment