Giter VIP home page Giter VIP logo

cob_spec's People

Contributors

bgerstle avatar cdemyanovich avatar chongkim avatar cmvandrevala avatar damonkelley avatar ecmendenhall avatar esmevane avatar hnlee avatar jdesrosiers avatar jneander avatar kevbuchanan avatar kevinliddle avatar macroexpanse avatar markpearlcoza avatar marosluuce avatar mateuadsuara avatar mathpunk avatar mikeebert avatar mylesmegyesi avatar onlyskin avatar patrickgombert avatar paulwpagel avatar paytonrules avatar ryanzverner avatar samsaradog avatar swalker- avatar takagoto avatar tamminhdao avatar trptcolin avatar ukutaht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cob_spec's Issues

Response to bogus requests in MethodNotAllowed

BogusRequest appears to be creating requests with randomly generated HTTP methods, and spec always requires the response to be 405 Method Not Allowed. Depending on what method name is randomly generated:

  • If it happens to generate as one of the IANA methods that is supported, then the response should be the suitable 2xx response.
  • If it happens to generate one of the IANA methods that is not supported, then the response should be 405 Method Not Allowed as per RFC7231 Section 6.5.5
  • If it happens to be a method name that is not any of the IANA methods, then shouldn't the response be 501 Not Implemented?

The last paragraph in RFC7231 Section 4 says as follows:

When a request method is received
that is unrecognized or not implemented by an origin server, the
origin server SHOULD respond with the 501 (Not Implemented) status
code.  When a request method is received that is known by an origin
server but not allowed for the target resource, the origin server
SHOULD respond with the 405 (Method Not Allowed) status code.

Should MethodNotAllowed be refactored to use one of the other IANA methods that is not used elsewhere in cob_spec -- maybe TRACE or CONNECT?

PatchWithEtag requires a newline to pass

In the PatchWithEtag test a newline is being required after the file contents are updated; however, the test does not add this to the body data it sends to the server. This results in the SHA1 checksums being different than what is provided in the test.

http-server.startup=> (slurp (io/file "/cob_spec/public/patch-content.txt"))
"default content\n"
http-server.startup=> (sha1 (io/file "/cob_spec/public/patch-content.txt"))
"60bb224c68b1ed765a0f84d910de58d0beea91c4"
http-server.startup=> (spit "/cob_spec/public/patch-content.txt" "default content")
nil
http-server.startup=> (sha1 (io/file "/cob_spec/public/patch-content.txt"))
"dc50a0d27dda2eee9f65644cd7e4c9cf11de8bec"
http-server.startup=>

I have a branch where I have removed the newline from the file, and changed the checksums to match the new file.

rubyslim submodule

After following the README instructions, tests failed with:

ruby: No such file or directory -- rubyslim/lib/run_ruby_slim.rb (LoadError)

So I needed to update the submodule, but I got No submodule mapping found in .gitmodules for path 'rubyslim' after running git submodule update. Apparently this happens when there's a gitlink but no actual submodule (see http://stackoverflow.com/questions/4185365/no-submodule-mapping-found-in-gitmodule-for-a-path-thats-not-a-submodule).

Anyway, I created a submodule for the project on a new branch (rubyslim_submodule) and pushed, so if someone wants to verify that's the right approach and merge that branch into master, it'll make setup easier for others in the future.

  • Colin

Java 9 ClassCastException with URLClassLoader

cob_spec is having trouble with Java 9's module system. ClassLoaders can no longer be cast as URLClassLoaders.

Given: Using Java 9 and having added two lines to the pom.xml properties to allow mvn package to compile:

    <properties>
       ...
        <maven.compiler.source>9.0</maven.compiler.source>
        <maven.compiler.target>9.0</maven.compiler.target>
    </properties>

When: $ java -jar fitnesse.jar -p 9090

Then:

Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
	at util.FileUtil.addUrlToClasspath(FileUtil.java:216)
	at util.FileUtil.addFileToClassPath(FileUtil.java:212)
	at util.FileUtil.addItemsToClasspath(FileUtil.java:207)
	at fitnesse.components.PluginsClassLoader.addPluginsToClassLoader(PluginsClassLoader.java:15)
	at fitnesseMain.FitNesseMain.loadPlugins(FitNesseMain.java:47)
	at fitnesseMain.FitNesseMain.launchFitNesse(FitNesseMain.java:35)
	at fitnesseMain.FitNesseMain.main(FitNesseMain.java:27)

Something I found online about the issue:

screen shot 2017-11-06 at 10 29 51 am

Also there's this link

Incorrect assertion for PartialContent test

According to RFC 7233 section 2.1: "if the [suffix length] value is greater than or equal to the length...the byte range is interpreted as the remainder of the representation." In other words, if I request the range 1-1000 for a file that's 5 bytes long, I should get a valid response with Content-Range: 1-4.

Instead, cob_spec requests the range 75-80 for a file that's 77 bytes long, and expects to receive a response with the 416 status code and a Content-Range header with the value */77.

PatchWithEtag

Does it make sense to update this test (maybe like + section below), to include a failed update attempt when the ETag does not match? It seemed like right now, it could pass w/o checking the ETag.

 |script  |http browser                            |
 |set host|localhost                               |
 |set port|5000                                    |
 |get     |/patch-content.txt                      |
 |ensure  |response code equals|200                |
 |ensure  |body has content    |default content    |
 |set data|patched content                         |
 |set etag|dc50a0d27dda2eee9f65644cd7e4c9cf11de8bec| * sha1 of "default content"
 |patch   |/patch-content.txt                      |
 |ensure  |response code equals|204                |
 |get     |/patch-content.txt                      |
 |ensure  |response code equals|200                |
 |ensure  |body has content    |patched content    |

# Maybe add test for ETag that doesn't match.
+|set data|patched content                         |
+|set etag|dc50a0d27dda2eee9f65644cd7e4c9cf11de8bec| * sha1 of "default content"
+|patch   |/patch-content.txt                      |
+|ensure  |response code equals|412                |

 |set data|default content                         |
 |set etag|5c36acad75b78b82be6d9cbbd6143ab7e0cc04b0| * sha1 of "patched content"
 |patch   |/patch-content.txt                      |
 |get     |/patch-content.txt                      |
 |ensure  |body has content    |default content    |

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.