[debian] swagger: remove test

This commit is contained in:
André Roth
2026-06-14 20:14:32 +02:00
parent 23c7eedcde
commit 2ae5830239
4 changed files with 11 additions and 27 deletions
+2 -2
View File
@@ -75,9 +75,9 @@ azurite-start:
azurite-stop:
@kill `cat ~/.azurite.pid`
swagger: swagger-install
swagger: #swagger-install
# Generate swagger docs
@PATH=$(BINPATH)/:$(PATH) swag init --parseDependency --parseInternal --markdownFiles docs --generalInfo docs/swagger.conf
#@PATH=$(BINPATH)/:$(PATH) swag init --parseDependency --parseInternal --markdownFiles docs --generalInfo docs/swagger.conf
etcd-install:
# Install etcd
+7 -7
View File
@@ -169,7 +169,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
var dstStat os.FileInfo
dstStat, err = os.Stat(filepath.Join(poolPath, baseName))
dstStat, err = os.Stat(destinationPath)
if err == nil {
// already exists, check source file
@@ -188,7 +188,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
} else {
// if source and destination have the same checksums, no need to copy
var dstMD5 string
dstMD5, err = utils.MD5ChecksumForFile(filepath.Join(poolPath, baseName))
dstMD5, err = utils.MD5ChecksumForFile(destinationPath)
if err != nil {
return err
@@ -219,11 +219,11 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
// source and destination have different inodes, if !forced, this is fatal error
if !force {
return fmt.Errorf("error linking file to %s: file already exists and is different", filepath.Join(poolPath, baseName))
return fmt.Errorf("error linking file to %s: file already exists and is different", destinationPath)
}
// forced, so remove destination
err = os.Remove(filepath.Join(poolPath, baseName))
err = os.Remove(destinationPath)
if err != nil {
return err
}
@@ -238,7 +238,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
}
var dst *os.File
dst, err = os.Create(filepath.Join(poolPath, baseName))
dst, err = os.Create(destinationPath)
if err != nil {
_ = r.Close()
return err
@@ -266,9 +266,9 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
err = dst.Close()
} else if storage.linkMethod == LinkMethodSymLink {
err = localSourcePool.Symlink(sourcePath, filepath.Join(poolPath, baseName))
err = localSourcePool.Symlink(sourcePath, destinationPath)
} else {
err = localSourcePool.Link(sourcePath, filepath.Join(poolPath, baseName))
err = localSourcePool.Link(sourcePath, destinationPath)
}
return err
+2 -1
View File
@@ -83,8 +83,9 @@ serve_in_api_mode: false
# Enable metrics for Prometheus client
enable_metrics_endpoint: false
# Not implemented in this version.
# Enable API documentation on /docs
enable_swagger_endpoint: false
#enable_swagger_endpoint: false
# OBSOLETE: use via url param ?_async=true
async_api: false
-17
View File
@@ -1,17 +0,0 @@
from api_lib import APITest
class TaskAPITestSwaggerDocs(APITest):
"""
GET /docs
"""
def check(self):
resp = self.get("/docs/doc.json")
self.check_equal(resp.status_code, 200)
resp = self.get("/docs/", allow_redirects=False)
self.check_equal(resp.status_code, 301)
resp = self.get("/docs/index.html")
self.check_equal(resp.status_code, 200)