Skip to content

Commit

Permalink
Update unit test for internal function unzipToTemp
Browse files Browse the repository at this point in the history
- Move security markdown into .github directory
- Fix incorrect docs of the AddChart function
- Update the CodeQL config
  • Loading branch information
xuri committed Dec 14, 2024
1 parent b53bad3 commit 8e04909
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ func (opts *Chart) parseTitle() {
// is optional. The default value is auto.
//
// Alignment: Specifies that the alignment of the horizontal and vertical axis.
// The properties of font that can be set are:
// The properties of alignment that can be set are:
//
// TextRotation
// Vertical
Expand Down
6 changes: 1 addition & 5 deletions lib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"io"
"os"
"runtime"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -362,9 +361,6 @@ func TestReadBytes(t *testing.T) {
}

func TestUnzipToTemp(t *testing.T) {
if ver := runtime.Version(); strings.HasPrefix(ver, "go1.19") || strings.HasPrefix(ver, "go1.2") {
t.Skip()
}
os.Setenv("TMPDIR", "test")
defer os.Unsetenv("TMPDIR")
assert.NoError(t, os.Chmod(os.TempDir(), 0o444))
Expand All @@ -382,7 +378,7 @@ func TestUnzipToTemp(t *testing.T) {
"\x00\x00\x00\x00\x0000000000\x00\x00\x00\x00000" +
"00000000PK\x01\x0200000000" +
"0000000000000000\v\x00\x00\x00" +
"\x00\x0000PK\x05\x06000000\x05\x000000" +
"\x00\x0000PK\x05\x06000000\x05\x00\xfd\x00\x00\x00" +
"\v\x00\x00\x00\x00\x00")
z, err := zip.NewReader(bytes.NewReader(data), int64(len(data)))
assert.NoError(t, err)
Expand Down

0 comments on commit 8e04909

Please sign in to comment.